import Vue from 'vue'
import Router from 'vue-router'
import Index from '../pages/Index.vue'
import Home from "../pages/Home.vue"
import Singer from "../pages/Singer.vue"
import Listcate from "../pages/Listcate.vue"
import UCenter from "../pages/UCenter.vue"
import Search from "../pages/Search.vue"
import ListHot from "../pages/MusicList/List_hot.vue"
import ListNew from "../pages/MusicList/List_new.vue"
import ListKing from "../pages/MusicList/List_king.vue"
import MoreList from "../pages/MusicList/MoreList.vue"
import MoreNew from "../pages/MusicList/MoreNew.vue"
import MusicPlay from "../pages/MusicPlay.vue"
import MoreKing from "../pages/MusicList/MoreKing.vue"
import MorePlayList from "../pages/MusicList/MorePlayList.vue"
import SingerDetail from "../components/SingerDetail.vue"

Vue.use(Router)

export default new Router({
  routes: [
    // 播放页面   
    {
      path: "/musicPlay",
      name: "MusicPlay",
      component: MusicPlay
    },
    // 首页
    {
      path: '/',
      name: 'Index',
      redirect: "/home",
      component: Index,
      children: [
        {
          path: "home",
          component: Home,
          // 榜单 
          redirect: "/home/hot",
          children: [
            {
              path: "hot",
              component: ListHot
            },
            {
              path: "king",
              component: ListKing
            },
            {
              path: "news",
              component: ListNew
            }
          ]
        },
        // 头部导航
        {
          path: "singer",
          component: Singer,
        }, {
          path: "listcate",
          component: Listcate,
        }, {
          path: "ucenter",
          component: UCenter,
        }, {
          path: "search",
          component: Search,
        },
        // 更多页面
        { // 更多歌单
          path: "more",
          name: "MoreList",
          component: MoreList
        }, { // 更多新歌
          path: "moreNew",
          name: "MoreNew",
          component: MoreNew
        },{ // 更多榜单
          path: "moreKing",
          name: "MoreKing",
          component: MoreKing
        },{ // 歌单详情
          path: "morePlayList",
          name: "MorePlayList",
          component: MorePlayList
        },{ // 歌手详情
          path: "singerDetail",
          name: "SingerDetail",
          component: SingerDetail
        }
      ]
    }     
  ]
})
